<table class="docs-api-method-table">
  <thead>
    <tr class="docs-api-method-name-row">
      <th colspan="2" class="docs-api-method-name-cell">
        {%- if method.isDeprecated -%}
          <div class="docs-api-deprecated-marker">Deprecated</div>
        {%- endif -%}   
        {$ method.name $}
      </th>
    </tr>
  </thead>
  <tr class="docs-api-method-description-row">
    <td colspan="2" class="docs-api-method-description-cell">{$ method.description $}</td>
  </tr>

  {%- if method.params.length -%}
  <thead>
    <tr class="docs-api-method-parameters-header-row">
      <th colspan="2" class="docs-api-method-parameters-header-cell">Parameters</th>
    </tr>
  </thead>
  {% for parameter in method.params %}
  <tr class="docs-api-method-parameter-row">
    <td class="docs-api-method-parameter-cell">
      <p class="docs-api-method-parameter-name">
        {$ parameter.name $}
        {%- if parameter.isOptional -%}
          <span class="docs-api-method-parameter-optional-marker">?</span>
        {%- endif -%}
      </p>
      <code class="docs-api-method-parameter-type">{$ parameter.type $}</code>
    </td>
    <td class="docs-api-method-parameter-description-cell">
      <p class="docs-api-method-parameter-description">{$ parameter.description $}</p>
    </td>
  </tr>
  {% endfor %}
  {%- endif -%}

  {%- if method.showReturns -%}
  <thead>
    <tr class="docs-api-method-returns-header-row">
      <th colspan="2" class="docs-api-method-returns-header-cell">Returns</th>
    </tr>
  </thead>
  <tr>
    <td class="docs-api-method-returns-type-cell">
      <code class="docs-api-method-returns-type">{$ method.returnType $}</code>
    </td>
    <td class="docs-api-method-returns-description-cell">
      <p class="docs-api-method-returns-description">{$ method.returns.description $}</p>
    </td>
  </tr>
  {%- endif -%}
</table>
